<!DOCTYPE html><html><head><title>Ext.chart.Mask | Ext JS 4.0 Documentation</title><script type="text/javascript" src="../ext-all.js"></script><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../scrollbars.css" type="text/css"><link rel="stylesheet" href="../docs.css" type="text/css"><link id="styleCss" rel="stylesheet" href="../style.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script><link rel="stylesheet" href="../prettify.css" type="text/css"><!-- link(rel: 'stylesheet', href: req.baseURL + '/css/ext4.css', type: 'text/css')--><link rel="shortcut icon" type="image/ico" href="../favicon.ico"><!--[if IE]>
<style type="text/css">.head-band { display: none; }
.header { border: 0; top: 0; left: 0px; background: url(../header.gif) repeat-x; }
.doc-tab .members .member a.more { background-color: #efefef; }
</style><link rel="stylesheet" href="/new/css/ie.css" type="text/css"><![endif]-->
</head><body id="ext-body" class="iScroll"><div id="notice" class="notice">For up to date documentation and features, visit 
<a href="http://docs.sencha.com/ext-js/4-0">http://docs.sencha.com/ext-js/4-0</a></div><div class="wrapper"><div class="head-band"></div><div class="header"><h2><a href="../index.html">Sencha Documentation</a></h2></div><div id="search"><form><input type="text" placeholder="Search" id="search-field" autocomplete="off" name="q"></form><div id="search-box"></div></div><div id="treePanel"></div><div id="container"><script type="text/javascript">

    req = {
        liveURL: '.',
        standAloneMode: true,
        origDocClass: 'Ext.chart.Mask',
        docClass: 'Ext.chart.Mask',
        docReq: 'Ext.chart.Mask',
        version: '4.0',
        baseURL: '.',
        baseDocURL: '.',
        baseProdURL: '.'
    };

    clsInfo = {};



</script>

<script type="text/javascript" src="../search.js"></script>
<!--script type="text/javascript" src="/new/javascripts/app/examples.js"></script-->
<script type="text/javascript" src="../class_tree.js"></script>
<script type="text/javascript" src="../class_doc.js"></script>
<script type="text/javascript">
    req.source = 'Mask.html#Ext-chart.Mask';
    clsInfo = {"methods":["Mask"],"cfgs":[],"properties":[],"events":[],"subclasses":[]};
    Ext.onReady(function() {
        Ext.create('Docs.classPanel');
    });
</script><div id="top-block" class="top-block"><h1 id="clsTitle" class="cls"><a href="../source/Mask.html#Ext-chart.Mask" target="_blank">Ext.chart.Mask</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><p>Defines a mask for a chart's series.
The 'chart' member must be set prior to rendering.</p>

<p>A Mask can be used to select a certain region in a chart.
When enabled, the <code>select</code> event will be triggered when a
region is selected by the mask, allowing the user to perform
other tasks like zooming on that region, etc.</p>

<p>In order to use the mask one has to set the Chart <code>mask</code> option to
<code>true</code>, <code>vertical</code> or <code>horizontal</code>. Then a possible configuration for the
listener could be:</p>

<pre class="prettyprint"><code>    items: {
        xtype: 'chart',
        animate: true,
        store: store1,
        mask: 'horizontal',
        listeners: {
            select: {
                fn: function(me, selection) {
                    me.setZoom(selection);
                    me.mask.hide();
                }
            }
        },
</code></pre>

<p>In this example we zoom the chart to that particular region. You can also get
a handle to a mask instance from the chart object. The <code>chart.mask</code> element is a
<code>Ext.Panel</code>.</p>
<div class="members"><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-Mask" class="member f ni"><a href="Ext.chart.Mask.html#method-Mask" rel="method-Mask" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.chart.Mask.html" class="definedIn docClass">Ext.chart.Mask</a><br/><a href="../source/Mask.html#Ext-chart.Mask-method-constructor" class="viewSource">view source</a></div><a name="Mask"></a><a name="method-Mask"></a><a href="Ext.chart.Mask.html#" rel="method-Mask" class="cls expand">Mask</a> : void</div><div class="description"><div class="short"><p>&nbsp;</p></div><div class="long">
<h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>